Practical algorithms to rank necklaces, Lyndon words, and de Bruijn sequences

نویسندگان

  • Joe Sawada
  • Aaron Williams
چکیده

We present practical algorithms for ranking k-ary necklaces and Lyndon words of length n. The algorithms are based on simple counting techniques. By repeatedly applying the ranking algorithms, both necklaces and Lyndon words can be efficiently unranked. Then, explicit details are given to rank and unrank the length n substrings of the lexicographically smallest de Bruijn sequence of order n.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Gray code for fixed-density necklaces and Lyndon words in constant amortized time

This paper develops a constant amortized time algorithm to produce a cyclic cool-lex Gray code for fixed-density binary necklaces, Lyndon words, and pseudo-necklaces. It is the first Gray code for these objects that achieves this time bound. The algorithm is applied: (i) to develop a constant amortized time cyclic Gray code for necklaces, Lyndon words, and pseudo-necklaces ordered by density an...

متن کامل

Efficient Ranking of Lyndon Words and Decoding Lexicographically Minimal de Bruijn Sequence

We give efficient algorithms for ranking Lyndon words of length n over an alphabet of size σ. The rank of a Lyndon word is its position in the sequence of lexicographically ordered Lyndon words of the same length. The outputs are integers of exponential size, and complexity of arithmetic operations on such large integers cannot be ignored. Our model of computations is the word-RAM, in which bas...

متن کامل

Computing k-th Lyndon Word and Decoding Lexicographically Minimal de Bruijn Sequence

Let Σ be a finite ordered alphabet. We present polynomialtime algorithms for computing the k-th in the lexicographic order Lyndon word of a given length n over Σ and counting Lyndon words of length n that are smaller than a given word. We also use the connections between Lyndon words and minimal de Bruijn sequences (theorem of Fredricksen and Maiorana) to develop the first polynomial time algor...

متن کامل

Fixed-Density Necklaces and Lyndon Words in Cool-lex Order

This paper creates a simple Gray code for fixed-density binary necklaces and Lyndon words. The Gray code is simultaneously a left-shift Gray code and a 2-transposition Gray code and is cyclic with these properties. It also has the advantage of using canonical representations (lexicographically minimum rotations) yielding the first known Gray code for Lyndon words ordered by density. This work s...

متن کامل

Lyndon Words and de Bruijn sequences in a Subshift of Finite Type

This work generalizes the concepts of Lyndon words and de Bruijn sequence to the language of subshifts of finite type, extending its properties to this more general case. It is also studied the validity of Fredricksen and Maiorana theorem in this context and it is presented an algorithm to construct a de Bruijn sequence using Lyndon words.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • J. Discrete Algorithms

دوره 43  شماره 

صفحات  -

تاریخ انتشار 2017